﻿<?php
session_start();
$sess_userid=$_SESSION[sess_userid];
$sess_username=$_SESSION[sess_username];
if ($sess_userid<>session_id() or $sess_username=="") {
header( "Location: login.php"); exit(); /* ¶éÒÂÑ§äÁèŒèÒ¹¡ÒÃÅçÍ¡ÍÔ¹ÁÒ¡çäÅè¡ÅÑºä»ÅçÍ¡ÍÔ¹·ÕèË¹éÒ login.php */
} 
include('config.inc.php');
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$charset\" />";
if(!$p){
	$p="weclome";
}else{
	$p = $_GET['p'];
}
$p .= ".php";
?>
<html>
<head>

<title>ระบบแจ้งซ่อมอุปกรณ์สำนักงาน </title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div align="center">
	<div id="header">
    	<div id="logo">
       	  <img src="images/logo_ttt.png" alt="Logo" height="120"/>
    	</div>
        <div id="address" align="left">
			<strong>TT&T LTD,.CO.</strong><br />
            Evergreen Terrace 742<br />
            Kansas Missouri<br />
            Phone: 432-653-3121<br />
            sales@somecompany.com
      	</div>
        <div id="menu">
        	<a href="#" id="on">หน้าแรก</a>  
			<a href="#">Intranet</a>

			<a href="#">Control panel</a>
        </div>
    </div>
    <div id="content" align="justify">
    <span class="TITLE"><center>ยินดีต้อนรับสู่ระบบแจ้งซ่อมอุปกรณ์สำนักงาน </center></span>
	<span class="user"><? echo "คุณ ".$sess_username."   -----  ".$sess_status;?> <br/><br/></span>
        <div id="menutabs">
<?php 
echo "<a href='?p=search'";
if($p=="welcome.php"){
echo "class='tabon'";
}
echo ">อุปกรณ์สำนักงาน</a>";
echo "<a href='?p=process'";
if($p=="process.php"){
echo "class='tabon'";
}
echo ">    แจ้งเหตุเสีย</a>";
echo "<a href='?p=search'";
if($p=="search.php"){
echo "class='tabon'";
}
echo ">ติดตามแจ้งเหตุเสีย</a>";
echo "<a href='?p=showdetail'";
if($p=="showdetail.php"){
echo "class='tabon'";
}
echo ">ดูประวัติการแจ้งเหตุ</a>";
?>
        </div>
        <br/>
        <div id="left">
            <?php 
			include($p);
			?>
        </div>
        <div id="right"><strong class="L12">QUESTIONS?</strong><br />
            <br />
            Contact us:<br />
            <strong><br />
            TT&T LTD,.CO.</strong><br />
            Evergreen Terrace 742<br />
            Kansas Missouri<br />
            Phone: 432-653-3121<br />
            sales@somecompany.com
        </div>
        <div style="clear:both"></div>
    </div>
    <div id="footer">
        <a href="#">Home</a> | <a href="#">About Us</a> | <a href="#">Products</a> | <a href="#">Contact Us</a><br />
        Your Company Name &copy; 2009<br />
        Designed by <a href="http://www.winkhosting.com" title="Hosting Colombia"><strong>Colombia Hosting</strong></a>    </div>
    </div>
</body>
</html>
